home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
pasprog.EXE
/
REFHZ.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-08-28
|
658b
|
39 lines
uses crt,dos;
procedure wait_retrace;assembler;
asm
mov dx,03dah
@re:
in al,dx
test al,8
jnz @re
@no:
in al,dx
test al,8
jz @no
end;
var
h1, m1, s1, u1 : Word;
h2, m2, s2, u2 : Word;
f : longint;
n : word;
begin
clrscr;
repeat
wait_retrace;
GetTime(h1,m1,s1,u1);
for n:=1 to 100 do wait_retrace;
GetTime(h2,m2,s2,u2);
f:=((longint(h2)-longint(h1))*36000)+
((longint(m2)-longint(m1))*6000)+
((longint(s2)-longint(s1))*100)+
(longint(u2)-longint(u1));
if f<>0 then writeln((10000/f):2:2,'Hz');
until keypressed;
end.
var